﻿namespace ZFramework.Runtime
{
    public class UnloadSceneSuccessEventArgs : GameEventArgs
    {
        public static int EventId = typeof(UnloadSceneSuccessEventArgs).GetHashCode();

        public UnloadSceneSuccessEventArgs()
        {
            SceneName = string.Empty;
            UserData = null;
        }

        public string SceneName { get; private set; }

        public object UserData { get; private set; }

        public static UnloadSceneSuccessEventArgs Create(string sceneName, object userData)
        {
            UnloadSceneSuccessEventArgs args = ReferencePool.Acquire<UnloadSceneSuccessEventArgs>();
            args.SceneName = sceneName;
            args.UserData = userData;
            return args;
        }

        public override int Id
        {
            get { return EventId; }
        }

        public override void Clear()
        {
            SceneName = string.Empty;
            UserData = null;
        }
    }
}
